<template>
  <div>
    <!-- 给标签绑定事件 -->
    <p>{{ count }}</p>
    <button @click="add">+1</button>
    <button @click="add5(5)">+5</button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      count: 0,
    };
  },
  methods: {
    add() {
      this.count = this.count + 1;
    },
    add5(n) {
      this.count += n;
    },
  },
};
</script>
<style>
</style>
